import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: '',
        // 重定向
        redirect: '/system/user',
        component: () => import(/* webpackChunkName: "about" */ '../views/NoticeMange.vue')
    },
    {
        path: '/system/notice',
        name: 'systemNotice',
        component: () => import(/* webpackChunkName: "about" */ '../views/NoticeMange.vue')
    },
    {
        path: '/system/log/operlog',
        name: 'systemLogOperlog',
        component: () => import(/* webpackChunkName: "about" */ '../views/OperlogView.vue')
    },
    {
        path: '/system/notice/:noticeId',
        name: 'systemDetail',
        component: () => import(/* webpackChunkName: "about" */ '../views/NoticeDetail.vue')
    },
    {
        path: '/system/user',
        name: 'UserView',
        component: () => import(/* webpackChunkName: "about" */ '../views/UserView.vue')
    },
    {
        path: '/system/user-auth/role/:userId',
        name: 'UserAuthView',
        component: () => import(/* webpackChunkName: "about" */ '../views/UserAuthView.vue')
    }
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
